Virtualization allows multiplexing of the underlying host machine between different virtual machines. The host computer allocates a certain amount of its resources to each of the virtual machines. Each virtual machine is then able to use the allocated resources to execute applications, including operating systems (referred to as guest operating systems). The software layer providing the virtualization is commonly referred to as a hypervisor and is also known as a virtual machine monitor (VMM), a kernel-based hypervisor or a host operating system. The hypervisor emulates the underlying hardware of the host computer, making the use of the virtual machine transparent to the guest operating system and the user of the virtual machine.
Generally, information about the configuration and state of the entities in a virtual machine system, such as virtual machines, virtual disks, host machines, storage domains, etc., is stored in a system database. When a request is received to execute a command, management software executes a transaction to perform the operations needed to carry out the command. As the operations in the transaction affect entities in the virtual machine system, the changes that are made to those entities are typically committed to the system database. In some cases, the transactions required to carry out a command can be lengthy and resource intensive. Certain systems have attempted to solve this problem by shortening the transaction length. By breaking up a command into multiple shorter transactions, any one particular resource is not “locked” or otherwise made unavailable for any significant period of time. In this case, however, the changes caused by each transactions are committed to the system database at the end of each transaction. Once the changes are committed to the system database, there is generally no way to roll back those changes to revert to the previous state. Thus, if there is an crash or failure during the execution of the transaction, the system may not be able to recover and restore the values in the system database to the state before the command was initiated.